{php include wl_template('common/header');}
<ul class="nav nav-tabs" id="myTab">
	<li class="active"><a href="#tab_basic">基本设置</a></li>
	<li><a href="#tab_share">首页分享</a></li>
</ul>
<div class="app-content">
	<div class="app-form">
			<form action="" method="post" class="form-horizontal form-validate" id="setting-form">
				<div class="panel panel-default">
					<div class="panel-heading">抢购设置</div>
					<div class="panel-body">
						<div class="tab-content">
							<div class="tab-pane active" id="tab_basic">
								<div class="form-group">
									<label class="col-sm-2 control-label">关注抢购提前通知时间</label>
									<div class="col-sm-9">
										<div class="input-group">
											<input type="text" name="base[follow_time]" min="0" class="form-control" value="{$base['follow_time']}" />
											<span class="input-group-addon">分钟</span>
										</div>
										<span class="help-block">用户关注抢购后，提前通知时间，默认十分钟</span>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">首页社群</label>
									<div class="col-sm-9">
										<select name="base[communityid]" class="form-control chosen-select">
											<option value="0" >不显示社群</option>
											{loop $communitylist $key $val}
											<option value="{$val['id']}" {if $val['id'] == $base['communityid']}selected{/if}>{$val['communname']}</option>
											{/loop}
										</select>
										<span class="help-block">请选择首页是否显示社群</span>
									</div>
								</div>
								<div class="form-group hide">
									<label class="col-sm-2 control-label">选项卡分类是否显示图片</label>
									<div class="col-xs-12 col-sm-8">
										<div class="radio radio-success radio-inline">
											<input type="radio" id="inlineRadioo2" name="base[img_switch]" value="0" {if $base['img_switch'] != 1}checked="checked"{/if}>
											<label for="inlineRadioo2">关闭 </label>
										</div>
										<div class="radio radio-success radio-inline">
											<input type="radio" id="inlineRadioo1" name="base[img_switch]" value="1" {if $base['img_switch'] == 1}checked="checked"{/if}>
											<label for="inlineRadioo1">开启 </label>
										</div>
										<span class="help-block">开启后，所有抢购选项卡下面的分类都会显示图片</span>
									</div>
								</div>
							</div>
							<div class="tab-pane" id="tab_share">
								<div class="alert alert-info">
									<b>适用模板变量：[昵称] [时间] [系统名称]</b>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">分享标题</label>
									<div class="col-sm-9">
										<input type="text" name="base[share_title]" class="form-control" value="{$base['share_title']}" />
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">分享图片</label>
									<div class="col-sm-9">
										{php echo attachment_select('base[share_image]', $base['share_image']);}
										<span class="help-block">推荐图片尺寸500X500</span>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">分享描述</label>
									<div class="col-sm-9">
										<input type="text" name="base[share_desc]" class="form-control" value="{$base['share_desc']}" />
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-9">
						<input type="submit" name="submit" value="提交" class="btn btn-primary min-width" />
						<input type="hidden" name="token" value="{$_W['token']}" />
					</div>
				</div>
			</form>
	</div>
</div>
<script>
	$(function() {
		window.optionchanged = false;
		$('#myTab a').click(function(e) {
			e.preventDefault(); //阻止a链接的跳转行为
			$(this).tab('show'); //显示当前选中的链接及关联的content
		})
	});
</script>
{php include wl_template('common/footer');}